package com.test27_二叉树;

import com.test27_二叉树.util.IMap;
import com.test27_二叉树.vo.Book;
import org.junit.Test;

/**
 * 自定义Map工具类
 */
public class YootkDemo_02 {

    @Test
    public void test1() {
        IMap<String, Book> map = IMap.getInstance();
        System.out.println("【保存数据】" + map.put("java", new Book("Java从入门到项目实战", "李兴华", 99.8)));
        System.out.println("【保存数据】" + map.put("python", new Book("Python从入门到项目实战", "李兴华", 98.8)));
        System.out.println("【保存数据】" + map.put("java", new Book("Java从入门到项目实战(第二版)", "李兴华", 99.9)));
        System.out.println("【元素个数】" + map.size());
        System.out.println("【获取数据】" + map.get("java"));
        System.out.println("【获取数据】" + map.get("python"));
    }
}
